<template>
    <div>
        <el-table
                :data="warnInfo"
                border
                v-bind:cell-class-name="getCellClass"
                class="tb-edit"
                style="width: 100%">
            <el-table-column v-for="(column,i) in columnNameList"
                             :prop="column.propName" :label="column.name"
                             width="120"></el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                columnNameList: [
                    {name: '行号', propName: 'row'},
                    {name: '列号', propName: 'column'},
                    {name: '错误信息', propName: 'msg'},
                ],
            }
        },
        props: ['warnInfo'],
        methods: {
            getCellClass() {
                return 'cellclass';
            }
        }
    }

</script>

<style lang="scss">
    .cellclass {
        color: #FF4D4F;
    }
</style>